
import  Qexe from  "../../main/js/com/1110111011101110/qexecute/Qexe.js"
import  fs from "fs"

import  path from "path"
import StrTo from "../../main/js/com/1110111011101110/qbasics/utils/StrTo.js";

let qexe=new Qexe();

class  Wordss{
    /**
     * 字
     * @param strNums
     */
    static word(str){
        //拆分直接添加
        let res=[];
        let srts=str.split("");
        for(let i=0;i<srts.length;i++){
            let num= StrTo.utf8ToNum(srts[i]);
            let wordId =qexe.word.addWord(num);
            res.push(wordId)
        }
        return res;

    }
}

let data=fs.readFileSync( path.join(__dirname,'../../../测试3.jsr'));

console.log(data)
qexe.loadData(data)


let srt1="配置依赖和启动文件，项目名称XXX，依赖都管核心包、网页基础包。"
let wordIds= Wordss.word(srt1)

console.log(wordIds);

qexe.emit(2, wordIds,"","")



